<?php 
if(!isset($_SESSION))
    session_start();
class partner extends CI_Controller  {

        /**
        * Index Page for this controller.
        *
        * Maps to the following URL
        * 		http://example.com/index.php/welcome
        *	- or -  
        * 		http://example.com/index.php/welcome/index
        *	- or -
        * Since this controller is set as the default controller in 
        * config/routes.php, it's displayed at http://example.com/
        *
        * So any other public methods not prefixed with an underscore will
        * map to /index.php/welcome/<method_name>
        * @see http://codeigniter.com/user_guide/general/urls.html
        */
       private $_configs = null;
       function __construct()
        {
            parent::__construct();
            $this->load->helper('url');
            $this->load->library('smarty3');
            $this->smarty=new CI_Smarty3();$this->smarty->error_reporting = E_ALL & ~E_NOTICE;
            $_SESSION["DRegion"]=isset($_SESSION["DRegion"])?$_SESSION["DRegion"]:"";
            $_SESSION["DRegionName"]=isset($_SESSION["DRegionName"])?$_SESSION["DRegionName"]:"Toàn Quốc";
            require APPPATH .'controllers/Excution.php';
            $Excution = new Excution();
            $Excution->Init();
        }
        public function index()
	{
            $Configs["U"]["avata"]="default";
            $Configs["U"]["email"]="";
            if(isset($_SESSION["D-USER"])){$Configs["U"]=$_SESSION["D-USER"];}
            $data=null;
            $this->load->model('deal/guide_model');
            $this->guide_model=new guide_model();
            $tmp=$this->guide_model->getByID("44");
            $data["partner"]=$tmp[0];
            $this->load->model('APanel/type_model');
            $this->type_model=new type_model();
            $oPartners=$this->type_model->getPartners();
            $data["oPartner"]=$oPartners;
            $this->smarty
                    ->assign('data', $data)
                    ->assign('_SESSION', $_SESSION)
                    ->assign('Configs', $Configs)
                    ->display  ("templates/01_partner");
	}
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */